<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="仓库">
              <j-dict-select-tag
                default-select-first
                placeholder="请选择仓库"
                v-model="queryParam.warehouseCode"
                dictCode="wms_warehouse,warehouse_name,warehouse_code" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="物料名称">
              <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="物料编码">
              <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="10" :lg="11" :md="12" :sm="24" v-if="status === 3">
            <a-form-item label="出库日期">
              <j-date
                :show-time="true"
                date-format="YYYY-MM-DD"
                placeholder="请选择开始时间"
                class="query-group-cust"
                v-model="queryParam.outboundDateBegin"></j-date>
              <span class="query-group-split-cust"></span>
              <j-date
                :show-time="true"
                date-format="YYYY-MM-DD"
                placeholder="请选择结束时间"
                class="query-group-cust"
                v-model="queryParam.outboundDateEnd"></j-date>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button
        v-if="status === 3"
        type="primary"
        icon="download"
        @click="handleExportXls('出库记录表')">导出
      </a-button>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
        >项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
        <span style="float:right;">
          <a-popover title="自定义列" trigger="click" placement="leftBottom">
            <template slot="content">
              <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
                <a-row style="width: 400px">
                  <template v-for="(item,index) in defColumns">
                    <template v-if="item.key!=='rowIndex'&& item.dataIndex!=='action'">
                        <a-col :span="12"><a-checkbox :value="item.dataIndex"><j-ellipsis :value="item.title" :length="10"></j-ellipsis></a-checkbox></a-col>
                    </template>
                  </template>
                </a-row>
              </a-checkbox-group>
            </template>
            <a><a-icon type="setting" />设置</a >
          </a-popover>
        </span>
      </div>

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="outboundRecordItemId"
        class="j-table-force-nowrap1"
        :scroll="{x:true}"
        :columns="computedColumns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">

        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <span slot="action" slot-scope="text, record" class="action">
          <approval-buttons
            :status="status"
            @success="loadData"
            :data-id="record.id"
            :service-name="serviceName"
            :variables="record"
          />
          <a @click="handleEdit(record)" v-if="status === 1">编辑</a>
          <template v-if="status === 2">
            <a @click="printPickPreview(record)">拣料单打印</a>
            <!--
            <a-dropdown>
              <a class="ant-dropdown-link">拣料 <a-icon type="down" /></a>
              <a-menu slot="overlay">
                <a-menu-item v-if="['1','3'].includes(record.pickingStatus) && ![4, 5].includes(record.outboundType)">
                  <a @click="handlePicking(record)"
                    v-if="['1','3'].includes(record.pickingStatus) && ![4, 5].includes(record.outboundType)">拣料</a>
                </a-menu-item>
                <a-menu-item v-if="record.pickingStatus === '2'">
                  <a @click="handleAudit(record)" v-if="record.pickingStatus === '2'">审核</a>
                </a-menu-item>
                <a-menu-item>
                  <a @click="printPickPreview(record)">拣料单打印</a>
                </a-menu-item>
              </a-menu>
            </a-dropdown>
            -->
          </template>
          <a @click="handleDetailInfo(record)" v-if="status === 3">出库信息</a>
          <a @click="printPreview(record)" v-if="status === 3">单据打印</a>
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item v-if="![2,3].includes(status)">
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>

    <outbound-record-new-modal ref="modalForm" @ok="modalFormOk" />
    <outbound-record-picking-modal ref="modalPickingForm" @ok="modalFormOk" />
    <outbound-record-picking-audit-modal ref="modalPickingAuditForm" @ok="modalFormOk" />
  </a-card>
</template>

<script>

import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
import '@/assets/less/TableExpand.less'
import OutboundRecordNewModal from './modules/OutboundRecordNewModal.vue'
import OutboundRecordPickingModal from './modules/OutboundRecordPickingModal.vue'
import OutboundRecordPickingAuditModal from './modules/OutboundRecordPickingAuditModal.vue'
import ApprovalButtons from '@comp/approval/ApprovalButtons.vue'

export default {
  name: 'OutboundRecordList',
  mixins: [JeecgListMixin],
  components: {
    ApprovalButtons,
    OutboundRecordPickingAuditModal,
    OutboundRecordPickingModal,
    OutboundRecordNewModal
  },
  props: {
    status: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {
      description: '出库记录表管理页面',
      disableMixinCreated: true,
      // 表头
      columns1: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 40,
          align: 'center',
          fixed: 'left',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '出库记录单号',
          align: 'center',
          dataIndex: 'recordNumber',
          fixed: 'left'
        },
        {
          title: '出库类型',
          align: 'center',
          dataIndex: 'outboundType_dictText',
          fixed: 'left'
        },
        {
          title: '单据号',
          align: 'center',
          dataIndex: 'documentNumber',
          fixed: 'left'
        },
        /*
        {
          title: '出库单号',
          align: 'center',
          dataIndex: 'outboundNumber',
          fixed: 'left'
        },
         */
        {
          title: '出库日期',
          align: 'center',
          dataIndex: 'outboundDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '拣料状态',
          align: 'center',
          dataIndex: 'pickingStatus_dictText'
        },
        {
          title: '客户名称',
          align: 'center',
          dataIndex: 'customerName'
        },
        {
          title: '客户物料编码',
          align: 'center',
          dataIndex: 'customerMaterialCode'
        },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialCode'
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName',
          width: 120
        },
        {
          title: '规格型号',
          align: 'center',
          dataIndex: 'specificationModel'
        },
        {
          title: '单位',
          align: 'center',
          dataIndex: 'unit_dictText'
        },
        {
          title: '辅单位',
          align: 'center',
          dataIndex: 'secondaryUnit_dictText'
        },
        {
          title: '收货地址',
          align: 'center',
          dataIndex: 'deliveryAddress'
        },
        {
          title: '领料仓库',
          align: 'center',
          dataIndex: 'warehouseCode_dictText'
        },
        {
          title: '发货/领料日期',
          align: 'center',
          dataIndex: 'issueDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '生产日期',
          align: 'center',
          dataIndex: 'productionDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '限用日期',
          align: 'center',
          dataIndex: 'expirationDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '批次号',
          align: 'center',
          dataIndex: 'batchNumber'
        },
        {
          title: '物料批号',
          align: 'center',
          dataIndex: 'materialBatchNumber'
        },
        {
          title: '储位',
          align: 'center',
          dataIndex: 'storageLocation_dictText'
        },
        {
          title: '入库日期',
          align: 'center',
          dataIndex: 'entryDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '质检状态',
          align: 'center',
          dataIndex: 'qualityInspectionStatus_dictText'
        },
        {
          title: '通知出库数量',
          align: 'center',
          dataIndex: 'notifyOutboundQuantity'
        },
        {
          title: '拣料数量',
          align: 'center',
          dataIndex: 'pickingQuantity'
        },
        {
          title: '拣料人',
          align: 'center',
          dataIndex: 'picker_dictText'
        },
        {
          title: '拣料部门',
          align: 'center',
          dataIndex: 'pickingDept_dictText'
        },
        {
          title: '拣料日期',
          align: 'center',
          dataIndex: 'pickingDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '审核数量',
          align: 'center',
          dataIndex: 'auditQuantity'
        },
        {
          title: '经办人',
          align: 'center',
          dataIndex: 'createBy_dictText'
        },
        {
          title: '经办部门',
          align: 'center',
          dataIndex: 'sysOrgCode_dictText'
        },
        {
          title: '经办日期',
          align: 'center',
          dataIndex: 'createTime',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 40,
          align: 'center',
          fixed: 'left',
          customRender: function(t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '出库记录单号',
          align: 'center',
          dataIndex: 'recordNumber',
          fixed: 'left',
          sorter: (a, b) => {
            const valA = a.recordNumber || '';
            const valB = b.recordNumber || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '出库类型',
          align: 'center',
          dataIndex: 'outboundType_dictText',
          fixed: 'left',
          sorter: (a, b) => {
            const valA = a.outboundType_dictText || '';
            const valB = b.outboundType_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '单据号',
          align: 'center',
          dataIndex: 'documentNumber',
          fixed: 'left',
          sorter: (a, b) => {
            const valA = a.documentNumber || '';
            const valB = b.documentNumber || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '出库日期',
          align: 'center',
          dataIndex: 'outboundDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.outboundDate || '';
            const valB = b.outboundDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '拣料状态',
          align: 'center',
          dataIndex: 'pickingStatus_dictText',
          sorter: (a, b) => {
            const valA = a.pickingStatus_dictText || '';
            const valB = b.pickingStatus_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '客户名称',
          align: 'center',
          dataIndex: 'customerName',
          sorter: (a, b) => {
            const valA = a.customerName || '';
            const valB = b.customerName || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '客户物料编码',
          align: 'center',
          dataIndex: 'customerMaterialCode',
          sorter: (a, b) => {
            const valA = a.customerMaterialCode || '';
            const valB = b.customerMaterialCode || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '物料编码',
          align: 'center',
          dataIndex: 'materialCode',
          sorter: (a, b) => {
            const valA = a.materialCode || '';
            const valB = b.materialCode || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '物料名称',
          align: 'center',
          dataIndex: 'materialName',
          width: 120,
          sorter: (a, b) => {
            const valA = a.materialName || '';
            const valB = b.materialName || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '规格型号',
          align: 'center',
          dataIndex: 'specificationModel',
          sorter: (a, b) => {
            const valA = a.specificationModel || '';
            const valB = b.specificationModel || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '单位',
          align: 'center',
          dataIndex: 'unit_dictText',
          sorter: (a, b) => {
            const valA = a.unit_dictText || '';
            const valB = b.unit_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '辅单位',
          align: 'center',
          dataIndex: 'secondaryUnit_dictText',
          sorter: (a, b) => {
            const valA = a.secondaryUnit_dictText || '';
            const valB = b.secondaryUnit_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '收货地址',
          align: 'center',
          dataIndex: 'deliveryAddress',
          sorter: (a, b) => {
            const valA = a.deliveryAddress || '';
            const valB = b.deliveryAddress || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '领料仓库',
          align: 'center',
          dataIndex: 'warehouseCode_dictText',
          sorter: (a, b) => {
            const valA = a.warehouseCode_dictText || '';
            const valB = b.warehouseCode_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '发货/领料日期',
          align: 'center',
          dataIndex: 'issueDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.issueDate || '';
            const valB = b.issueDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '生产日期',
          align: 'center',
          dataIndex: 'productionDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.productionDate || '';
            const valB = b.productionDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '限用日期',
          align: 'center',
          dataIndex: 'expirationDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.expirationDate || '';
            const valB = b.expirationDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '批次号',
          align: 'center',
          dataIndex: 'batchNumber',
          sorter: (a, b) => {
            const valA = a.batchNumber || '';
            const valB = b.batchNumber || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '物料批号',
          align: 'center',
          dataIndex: 'materialBatchNumber',
          sorter: (a, b) => {
            const valA = a.materialBatchNumber || '';
            const valB = b.materialBatchNumber || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '储位',
          align: 'center',
          dataIndex: 'storageLocation_dictText',
          sorter: (a, b) => {
            const valA = a.storageLocation_dictText || '';
            const valB = b.storageLocation_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '入库日期',
          align: 'center',
          dataIndex: 'entryDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.entryDate || '';
            const valB = b.entryDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '质检状态',
          align: 'center',
          dataIndex: 'qualityInspectionStatus_dictText',
          sorter: (a, b) => {
            const valA = a.qualityInspectionStatus_dictText || '';
            const valB = b.qualityInspectionStatus_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '通知出库数量',
          align: 'center',
          dataIndex: 'notifyOutboundQuantity',
          sorter: (a, b) => {
            const valA = a.notifyOutboundQuantity;
            const valB = b.notifyOutboundQuantity;
            if (valA == null && valB == null) return 0;
            if (valA == null) return 1;
            if (valB == null) return -1;
            return Number(valA) - Number(valB);
          },
        },
        {
          title: '拣料数量',
          align: 'center',
          dataIndex: 'pickingQuantity',
          sorter: (a, b) => {
            const valA = a.pickingQuantity;
            const valB = b.pickingQuantity;
            if (valA == null && valB == null) return 0;
            if (valA == null) return 1;
            if (valB == null) return -1;
            return Number(valA) - Number(valB);
          },
        },
        {
          title: '拣料人',
          align: 'center',
          dataIndex: 'picker_dictText',
          sorter: (a, b) => {
            const valA = a.picker_dictText || '';
            const valB = b.picker_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '拣料部门',
          align: 'center',
          dataIndex: 'pickingDept_dictText',
          sorter: (a, b) => {
            const valA = a.pickingDept_dictText || '';
            const valB = b.pickingDept_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '拣料日期',
          align: 'center',
          dataIndex: 'pickingDate',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.pickingDate || '';
            const valB = b.pickingDate || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '审核数量',
          align: 'center',
          dataIndex: 'auditQuantity',
          sorter: (a, b) => {
            const valA = a.auditQuantity;
            const valB = b.auditQuantity;
            if (valA == null && valB == null) return 0;
            if (valA == null) return 1;
            if (valB == null) return -1;
            return Number(valA) - Number(valB);
          },
        },
        {
          title: '经办人',
          align: 'center',
          dataIndex: 'createBy_dictText',
          sorter: (a, b) => {
            const valA = a.createBy_dictText || '';
            const valB = b.createBy_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '经办部门',
          align: 'center',
          dataIndex: 'sysOrgCode_dictText',
          sorter: (a, b) => {
            const valA = a.sysOrgCode_dictText || '';
            const valB = b.sysOrgCode_dictText || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '经办日期',
          align: 'center',
          dataIndex: 'createTime',
          customRender: function(text) {
            return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
          },
          sorter: (a, b) => {
            const valA = a.createTime || '';
            const valB = b.createTime || '';
            return valA.localeCompare(valB, 'en');
          },
        },
        {
          title: '备注',
          align: 'center',
          dataIndex: 'remark'
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          width: 147,
          scopedSlots: { customRender: 'action' }
        }
      ],
      url: {
        list: '/wms/outbound/outbound-record/list',
        delete: '/wms/outbound/outbound-record/delete',
        deleteBatch: '/wms/outbound/outbound-record/deleteBatch',
        exportXlsUrl: '/wms/outbound/outbound-record/exportXls'
      },
      dictOptions: {},
      superFieldList: [],
      queryParam: {
        warehouseCode: ''
      },
      settingColumns: [],
      serviceName: 'outboundRecordService'
    }
  },
  watch: {
    'queryParam.warehouseCode': {
      handler(newVal) {
        if (newVal) {
          this.loadData()
        }
      },
      immediate: true
    }
  },
  created() {
    this.queryParam.status = this.status
    if (this.queryParam.warehouseCode) {
      this.loadData()
    }
  },
  beforeDestroy() {
    // 组件销毁前保存列设置到sessionStorage
    sessionStorage.setItem('outboundRecordListColumns', JSON.stringify(this.settingColumns))
  },
  mounted() {
    // 组件挂载后恢复列设置
    const savedColumns = JSON.parse(sessionStorage.getItem('outboundRecordListColumns'))
    if (savedColumns && savedColumns.length > 0) {
      this.settingColumns = savedColumns
    }
  },
  computed: {
    // 添加计算属性，根据settingColumns过滤显示的列
    computedColumns() {
      // 获取所有列的数据索引
      const allColumns = this.columns.map(col => col.dataIndex)
      // 如果设置了自定义列，则过滤显示
      if (this.settingColumns && this.settingColumns.length > 0) {
        return this.columns.filter(col => 
          this.settingColumns.includes(col.dataIndex) || 
          !col.dataIndex || // 保留没有dataIndex的列（如序号列）
          col.dataIndex === 'action' // 保留操作列
        )
      }
      // 默认显示所有列
      return this.columns
    }
  },
  methods: {
    onColSettingsChange(checkedValues) {
      // 存储到localStorage
      sessionStorage.setItem('outboundRecordListColumns', JSON.stringify(checkedValues))
      localStorage.setItem('outboundRecordListColumns', JSON.stringify(checkedValues))
      this.settingColumns = checkedValues
    },
    handlePicking(record) {
      this.$refs.modalPickingForm.picking(record)
      this.$refs.modalPickingForm.isInfo = false
      this.$refs.modalPickingForm.title = '拣料'
    },
    handleAudit(record) {
      this.$refs.modalPickingAuditForm.audit(record)
      this.$refs.modalPickingAuditForm.title = '审核'
    },
    handleDetailInfo(record) {
      this.$refs.modalPickingForm.info(record)
      this.$refs.modalPickingForm.isInfo = true
      this.$refs.modalPickingForm.title = '出库信息'
    },
    printPickPreview(record) {
      let id = record.id
      window.open(`${window._CONFIG['domianURL']}/jmreport/view/1099257166284267520?id=${id}`, '_blank')
    },
    printPreview(record) {
      let id = record.id
      window.open(`${window._CONFIG['domianURL']}/jmreport/view/1099247812839546880?id=${id}`, '_blank')
    },
    searchReset() {
      this.queryParam = {
        status: this.status
      }
      this.loadData(1)
    },
    initDictConfig() {
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';

span.action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.action a {
  position: relative;
}

.action a:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  width: 1px;
  height: 0.9em;
  background-color: #e8e8e8;
  margin: 0 -8px;
}
</style>